import type { RouteRecordRaw } from 'vue-router';

import Layout from '@/layouts/index.vue';

export const tableRoutes: RouteRecordRaw[] = [
  {
    path: '/table',
    name: 'TableRoot',
    component: Layout,
    redirect: '/table/table-list',
    meta: {
      title: '列表页',
      icon: 'List7',
      authCodes: ['FM_XM23071_COCKPIT'],
      visible: true,
    },
    children: [
      {
        path: '/table/table-list',
        name: 'TableList',
        component: () => import('@/views/table/table-list/index.vue'),
        meta: {
          authCodes: [],
          title: '基础查询表格',
          keepAlive: true,
        },
      },
      {
        path: '/table/table-list-2',
        name: 'TableList-2',
        component: () => import('@/views/table/table-list2/index.vue'),
        meta: {
          authCodes: [],
          title: '复杂查询表格',
          keepAlive: true,
        },
      },
      {
        path: '/table/table-list-1',
        name: 'TableList1',
        component: () => import('@/views/table/table-list1/index.vue'),
        meta: {
          authCodes: ['FM_XM23071_COCKPIT'],
          title: '标签页查询表格',
          keepAlive: true,
        },
      },
      {
        path: '/table/table-list-4',
        name: 'TableList4',
        component: () => import('@/views/table/table-list4/index.vue'),
        meta: {
          authCodes: ['FM_XM23071_COCKPIT'],
          title: '编辑表格',
          keepAlive: true,
        },
      }
    ],
  }
];
